#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "project.h"
#include "language.h"

int
main(int argc, char *argv[])
{
	check_language();

	char* request_url = getenv("REQUEST_URI");
	request_url += CGI_DIR_LENGTH;

	
	struct pedigree_list_unit p_l_unit;
	
	init_pedigree_list_unit(&p_l_unit);
	
	page_header(G_HOME, NULL, request_url);
	//printf("[id:%d, wife:%d, children:%d]",
	//	p_l_unit.self.id, p_l_unit.wife_num, p_l_unit.children_num);//debug
	page_home();
	page_footer();
}

int
page_home()
{
	fprintf(stdout, "<a href=%s>page_home</a><br \\>\n", G_HOME_PAGE_NAME);
	fprintf(stdout, "<a href=%s>page_list</a><br \\>\n", G_LIST_PAGE_NAME);
	fprintf(stdout, "<a href=%s>page_search</a><br \\>\n", G_SEARCH_PAGE_NAME);
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	fprintf(stdout, "page_home<br \\>\n");
	return 0;
}
